FROM harbor.snyq.ltd/public/node-v11.12.0

#作者信息
MAINTAINER phantomjs实现截图 821781113@qq.com

#复制文件
WORKDIR /app
COPY package.json  package.json
COPY server.js server.js
RUN rm -f /etc/yum.repos.d/*
COPY CentOS-snyq.repo  /etc/yum.repos.d/CentOS-snyq.repo
RUN yum install -y tar  bzip2 Xvfb
#安装依赖(registry在node-v14.21.1已定义为阿里云的,这里修改为自定义)
RUN npm config set registry http://nexus.snyq.ltd:8081/repository/npm-public/

#忽略一个安装文件
RUN npm install phantomjs-prebuilt@2.1.16 --ignore-scripts
RUN npm install
 
EXPOSE 9053
 
ENTRYPOINT ["node","server.js"]
